<?php htmlTemplate('admin_header_frame.php');?>
<div class="title">用户统计-地区统计

</div>


<table width="100%" cellspacing="1" cellpadding="3" id="listTable">
  <tbody>
  <?php 
  $totals=0;
  foreach ($rs as $k=>$v){
  	$totals = $totals+$v['sumuser'];;
  }
  ?> 
  
  <tr>
  	<th align="left" width="10%">地区</th>  
  	<th align="left" width="10%">比例</th>
  	<th>总人数</th> 
    <th>男生数</th>
    <th>女生数</th>
       
  </tr>

	<?php 
	$sumuser =0;
	$summ = 0;	
	$sumfm = 0;
	if ($rs){
	foreach ($rs as $k=>$v):
	$sumuser = $sumuser+ $v['sumuser'];
	$summ = $summ+ $v['summ'];
	$sumfm = $sumfm+ $v['sumfm'];
	
	?>
   <tr>
    <td align="left" width="10%"> 
    <?php if ($v['c_basic_address_province']) {echo $v['c_basic_address_province'];}else{ echo '未填写';}?>     
    </td>
    <td><?php echo (@round($v['sumuser']/$totals,4)*100).'%';?></td>
    <td align="center">
	<?php echo $v['sumuser'];?> 
	</td>
	<td align="center">
	<?php echo $v['summ'];?>  <?php echo (@round($v['summ']/$v['sumuser'],4)*100).'%';?>  
	</td>
	<td align="center">
	<?php echo $v['sumfm'];?> 
	</td>
	
	   
  </tr>
  <?php endforeach;}?>
  <tr style="background: #F4FAFB;">
  <td align="left">合计</td>
  	<td align="center">&nbsp; </td>
	<td align="center"><? echo $sumuser;?> </td>
	<td align="center"><? echo $summ;?></td>	
	<td align="center"><? echo $sumfm;?> </td>	
</tr>
 
 
  </tbody>
</table>
<?php htmlTemplate('admin_footer_frame.php');?>